<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ include  file="/jsps/common/taglibs.jsp" %>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    
    <title></title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->
	<script type="text/javascript" src="<c:url value="/js/jquery.js"/>"></script>
	<script type="text/javascript">
	  
	  //控制菜单的下拉和收缩
	  $(document).ready(function(){
	    
	    //鼠标移动到菜单选项上，图标进行变换
	    $("li span").mouseover(function(){
	      $(this).css("cursor","pointer");
	    });
	    
	    //鼠标移到菜单选项上时，子菜单进行伸缩切换
	    $("li span").click(function(){
	      $(this).css("cursor","pointer");
	      //找到主菜单项对应的子菜单项
		  var ulNode = $(this).next("ul");
		  ulNode.slideToggle();
	    });
	    
	    //设置登入用户使用界面功能的权限
	    if($("marquee").attr("title")=="超级管理员"){
	        $("#ordenary").css("display","none");
	    }else{
	        $("#super").css("display","none");
	    }
	    
	  });
	  
	  //控制显示时间
	  function showTime(){
	      
	       var output="";
           var nowTime=new Date();
   
           var datePart=nowTime.getYear()+"年"+(nowTime.getMonth()+1)+"月"+nowTime.getDate()+"日";
           var weekPart="星期"+"日一二三四五六".charAt(nowTime.getDay());
           var timePart=covertDbl(nowTime.getHours())+"："+covertDbl(nowTime.getMinutes())+"："+covertDbl(nowTime.getSeconds());   
           output=datePart+" "+weekPart+" "+timePart;
           
           document.getElementById("timeinfo").innerText=output;
   
           function covertDbl(value)
           {
               return (value+"").length!=2?"0"+value:value;  	
           } 
	       
	       
	  }
	  
	  //用户退出系统
	  function logout(){
	      
	      if(confirm("您确定要退出系统吗?")){
	          location.href="<c:url value="/clientSecurityMgr?act=logout"/>";
	      }
	      
	  }
	  
	  //控制导航栏的缩放
	  function hidden(){
	  
	         var navg=document.getElementById("navigator");
	         var obj=document.getElementById("navigator_controller");
	         var state=navg.style.display;
	        
	         if(state!='none'){
	           
	           navg.style.display="none";
	           obj.innerHTML="[显示导航]";
	           
	         }else{
	           
	           navg.style.display="block";
	           obj.innerHTML="[隐藏导航]";
	           
	         }
	  }
	  
	</script>
	
	<style type="text/css">
	  body,div,span,iframe,ul,li,marqueen{
	    margin:0px;
	    padding:0px;
	  }
	  .header{
	    height:88px;
	    border:1px solid blue;
	    background-image:url("<c:url value="/img/client/bg.gif"/>");
	  }
	  .header span{
	    color:blue;
	    font-size:45px;
	    font-weight:bolder;
	    position:relative;
	    left:20px;
	    top:18px;
	  }
	  .navigator{
	  	float:left;
	    width:210px;
	    height:520px;
	    padding:5px;
	    border:1px solid blue;
	    border-top:hidden;
	    background-image:url("<c:url value="/img/client/bg.gif"/>");
	  }
	  .navigator ul{
	    min-height:100px;
	    overflow:hidden;
	    background-image:url("<c:url value="/img/client/bg.gif"/>");
	  }
	  .content{
	  	float:left;
	    border:1px solid blue;
	    height:520px;
	    border-top:hidden;
	    border-left:hidden;
	  }
	  .marquee{
	  	height:20px;
	    width:120px;
	    position:absolute;
	    right:10px;
	    top:10px;
	    font-size:12px;
	    color:red;
	  }
	  li{
        list-style:none;
        list-style:none;
 	    background-image:url("<c:url value="/img/client/bg.gif"/>");
 	    display: block;
	  }
	  li span{
	    background-color:#CCCCFF;
	  }
	  .li_main ul{
	    display:none;
	  }
	  #timeinfo{
	    position:absolute;
	    right:5px;
	    top:40px;
	    font-size:12px;
	    color:blue;
	  }
	  div.log_out{
	    position:absolute;
	    right:25px;
	    top:65px;
	    font-size:15px;
	    color:blue;
	  }
	  div.navigator_controller{
	    position:absolute;
	    top:70px;
	    left:2px;
	    font-size:12px;
	    cursor:pointer;
	    color:blue;
	  }
	</style>

  </head>
  
  <body>
      <div class="header">
          <span class="productName">EASYSHOP-四人帮</span>
          <marquee class="marquee" title="${userRealName}">${userRealName},欢迎您使用本系统</marquee>
          <div class="navigator_controller" id="navigator_controller" onclick="hidden();">[隐藏导航]</div>
          <div id="timeinfo"></div>
           <script type="text/javascript">
               window.setInterval("showTime()",1000);
           </script> 
          <div class="log_out" title="点击离开系统"><a href="javascript:logout();">安全离开</a></div>
      </div>
      <div class="navigator" id="navigator">
          <ul>
              <li class="li_main">
                  <span>商品类别管理</span>
                  <ul>
                      <li><a href="<c:url value="/categoryMgr?act=for_add"/>" target="contentFrame">添加类别</a></li>
                      <li><a href="<c:url value="/categoryMgr?act=for_list"/>" target="contentFrame">查询类别</a></li>
                  </ul>
              </li>
              <li class="li_main">
                  <span>商品信息管理</span>
                  <ul>
                      <li><a href="<c:url value="/goodsMgr?act=for_add"/>" target="contentFrame">添加商品</a></li>
                      <li><a href="<c:url value="/goodsMgr?act=for_list"/>" target="contentFrame">查询商品</a></li>
                  </ul>
              </li>
              <li class="li_main">
                  <span>会员信息管理</span>
                  <ul>
                     <li><a href="<c:url value="/userMgr?act=for_add"/>" target="contentFrame">添加会员</a></li>
                     <li><a href="<c:url value="/userMgr?act=for_list"/>" target="contentFrame">查询会员</a></li>
                  </ul>
              </li>
              <li class="li_main" id="super">
                  <span>管理员信息管理</span> 
                  <ul>
                      <li><a href="<c:url value="/managerMgr?act=for_add"/>" target="contentFrame">添加管理员</a></li>
                      <li><a href="<c:url value="/managerMgr?act=for_list"/>" target="contentFrame">查询管理员</a></li>
                  </ul>
              </li>
              <li class="li_main">
                  <span>订单信息管理</span>
                  <ul>
                      <li><a href="<c:url value="/indentMgr?act=for_list"/>" target="contentFrame">查询订单</a></li>
                  </ul>
              </li>
              <li class="li_main" id="ordenary">
                  <span>个人管理中心</span>
                  <ul>
                      <li><a href="<c:url value="/managerMgr?act=for_selfupdate"/>" target="contentFrame">修改个人信息</a><br></li>
                  </ul>
              </li>
          </ul>
      </div>
      <div class="content">
          <iframe id="contentFrame" class="contentFrame" scrolling="auto" width="100%" height="100%" frameborder="0" name="contentFrame" allowtransparency="true" style="display:block" src="<c:url value="/jsps/client/welcome.html"/>">
          </iframe>
      </div>
  </body>
  <%@include file="/jsps/common/footer.jsp" %>
</html>